import Vue from "vue";
let user = [
  {
    name: "超管1",
    roleId: 1,
  },
  {
    name: "超管2",
    roleId: 2,
  },
  {
    name: "超管3",
    roleId: 3,
  },
];
let userinfo =JSON.parse(localStorage.getItem("userInfo"));

Vue.directive("add", function (el, bl) {
  
  let index = user.findIndex((r) => r.roleId == userinfo.Useranme);

  if (index == -1) {
    el.style.display = "none";
  }
});
